package com.mdd.common.mapper.order;

import com.mdd.common.core.basics.IBaseMapper;
import com.mdd.common.entity.goods.Goods;
import com.mdd.common.entity.order.OrderGoods;
import com.mdd.common.validate.order.GoodCartParam;
import com.mdd.common.validate.order.OrderGoodParam;
import com.mdd.common.vo.order.OrderGoodsInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单商品Mapper
 */
@Mapper
public interface OrderGoodsMapper extends IBaseMapper<OrderGoods> {

    /**
     * 商品评价统计
     *
     * @param userId
     * @return
     */
    Long getRateCountByUserId(@Param("userId") Integer userId);

    /**
     * 售后统计
     *
     * @param userId
     * @return
     */
    Long getAfterCountByUserId(@Param("userId") Integer userId);


    List<OrderGoodsInfoVo> getOrderGoodsInfo(@Param("req") OrderGoodParam req);


    List<Goods> getGoodList(@Param("req") GoodCartParam req);

}
